<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0,user-scalable=no">
  <title>学生信息管理系统</title>
  <link rel="stylesheet" href="${pageContext.request.contextPath}/layui/css/layui.css">
  <script src="${pageContext.request.contextPath}/layui/layui.js"></script>
  <script src="${pageContext.request.contextPath}/layui/axios.min.js"></script>
  <script src="${pageContext.request.contextPath}/layui/common.js"></script>

</head>
<body>
<table class="layui-table" id="job" lay-filter="job"></table>

<script>
  layui.use('table', function () {
    let table = layui.table;
    table.render({
      elem: '#job',
      url: '${pageContext.request.contextPath}/student/mycourse', // 数据接口
      totalRow: true, // 开启合计行
      totalRowText: '总计', // 总计行的显示文本
      defaultToolbar: [],
      cols: [
        [
          {field:'', type: 'checkbox', width:'3%', sort: true},
          {field:'stuId', width:'15%',  title: "学号", totalRowText: "合计:"},
          {field:'name', width:'20%',  title: "姓名", totalRowText: "总成绩:"},
          {field:'mark', width:'20%', title: '成绩', totalRow: true},
          {field:'courseName', width:'22%', title: "课程名", totalRowText: "总学分:"},
          {field:'credit',title: '学分', totalRow: true, totalRow: true},
        ]
      ],
    });
  });
</script>

</body>
</html>
